<<<<<<< .mine
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.8"/>
<title>prngd: IOUnit Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">prngd
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.8 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('class_i_o_unit.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Variables</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pri-attribs">Private Attributes</a> &#124;
<a href="class_i_o_unit-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">IOUnit Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Class for Input/Output File Operations.  
 <a href="class_i_o_unit.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_i_o_unit_8h_source.html">IOUnit.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a528f72b88cda0f5fe4e66386577c8084"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_i_o_unit.html#a528f72b88cda0f5fe4e66386577c8084">IOUnit</a> ()</td></tr>
<tr class="separator:a528f72b88cda0f5fe4e66386577c8084"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8dd9034a37c91c8bc979245c6d156070"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_i_o_unit.html#a8dd9034a37c91c8bc979245c6d156070">~IOUnit</a> ()</td></tr>
<tr class="separator:a8dd9034a37c91c8bc979245c6d156070"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6449179524033de1ced0c7475f112999"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_i_o_unit.html#a6449179524033de1ced0c7475f112999">checkFile</a> (char *filename)</td></tr>
<tr class="separator:a6449179524033de1ced0c7475f112999"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2f8aaf68900a5afb2536b3cec72ff46f"><td class="memItemLeft" align="right" valign="top">std::vector&lt; short &gt; *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_i_o_unit.html#a2f8aaf68900a5afb2536b3cec72ff46f">readFromFile</a> (char *filename, int offset)</td></tr>
<tr class="separator:a2f8aaf68900a5afb2536b3cec72ff46f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeff3307e483d37a668f06a136fade0b3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_i_o_unit.html#aeff3307e483d37a668f06a136fade0b3">writeToFile</a> (char *filename, char *data, int size)</td></tr>
<tr class="separator:aeff3307e483d37a668f06a136fade0b3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa8a8447579605b12e234fa3f1453cef6"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_i_o_unit.html#aa8a8447579605b12e234fa3f1453cef6">getBitCount</a> ()</td></tr>
<tr class="separator:aa8a8447579605b12e234fa3f1453cef6"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-attribs"></a>
Private Attributes</h2></td></tr>
<tr class="memitem:a1bea7057f76b80b660c7a095a4ebb4cb"><td class="memItemLeft" align="right" valign="top">std::ifstream&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_i_o_unit.html#a1bea7057f76b80b660c7a095a4ebb4cb">pIFile</a></td></tr>
<tr class="separator:a1bea7057f76b80b660c7a095a4ebb4cb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad31c0bc90ce593bd14177375c86385ea"><td class="memItemLeft" align="right" valign="top">std::ofstream&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_i_o_unit.html#ad31c0bc90ce593bd14177375c86385ea">pOFile</a></td></tr>
<tr class="separator:ad31c0bc90ce593bd14177375c86385ea"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a07549e3ee509ef843be69ba714e9726f"><td class="memItemLeft" align="right" valign="top">std::streambuf *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_i_o_unit.html#a07549e3ee509ef843be69ba714e9726f">pIbuf</a></td></tr>
<tr class="separator:a07549e3ee509ef843be69ba714e9726f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a509f96e751b34577c7c90a3db044a277"><td class="memItemLeft" align="right" valign="top">std::streambuf *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_i_o_unit.html#a509f96e751b34577c7c90a3db044a277">pObuf</a></td></tr>
<tr class="separator:a509f96e751b34577c7c90a3db044a277"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0ccf4cd0ab6b790dfa6c514ba82287c4"><td class="memItemLeft" align="right" valign="top">std::vector&lt; short &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_i_o_unit.html#a0ccf4cd0ab6b790dfa6c514ba82287c4">bitVector</a></td></tr>
<tr class="separator:a0ccf4cd0ab6b790dfa6c514ba82287c4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a09b8a4c138c982c0f069632df4711014"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_i_o_unit.html#a09b8a4c138c982c0f069632df4711014">bitCount</a></td></tr>
<tr class="separator:a09b8a4c138c982c0f069632df4711014"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad69fd8c50d1d63b31d8d4741cda787c9"><td class="memItemLeft" align="right" valign="top">char&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_i_o_unit.html#ad69fd8c50d1d63b31d8d4741cda787c9">nextChar</a></td></tr>
<tr class="separator:ad69fd8c50d1d63b31d8d4741cda787c9"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Class for Input/Output File Operations. </p>
<p>A little class for writing and reading from files in binary or ascii mode. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a528f72b88cda0f5fe4e66386577c8084"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">IOUnit::IOUnit </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Constructor </p>

</div>
</div>
<a class="anchor" id="a8dd9034a37c91c8bc979245c6d156070"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">IOUnit::~IOUnit </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Descturctor </p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a6449179524033de1ced0c7475f112999"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool IOUnit::checkFile </td>
          <td>(</td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>filename</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Checks if a file is ready to open. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">filename</td><td>The name of the file which has to opened. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True if the file is ok, flase if not. </dd></dl>

</div>
</div>
<a class="anchor" id="aa8a8447579605b12e234fa3f1453cef6"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int IOUnit::getBitCount </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>After using <a class="el" href="class_i_o_unit.html#a2f8aaf68900a5afb2536b3cec72ff46f">readFromFile(char*, int)</a>, you can use this function to get the number of read bits from the file. </p><dl class="section return"><dt>Returns</dt><dd>Number of bits of the last read file. </dd></dl>

</div>
</div>
<a class="anchor" id="a2f8aaf68900a5afb2536b3cec72ff46f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::vector&lt; short &gt; * IOUnit::readFromFile </td>
          <td>(</td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>filename</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>offset</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Function for reading a file in binary mode (e.g. for generated random bits). </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">filename</td><td>Name of the file. </td></tr>
    <tr><td class="paramname">offset</td><td>Offset for the filepointer (e.g. for skip some bytes of the file) </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A Pointer to an internal result vector, which contains the read bytes. </dd></dl>

</div>
</div>
<a class="anchor" id="aeff3307e483d37a668f06a136fade0b3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void IOUnit::writeToFile </td>
          <td>(</td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>filename</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>size</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Writes data into a file. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">filename</td><td>Name of the file to write to. </td></tr>
    <tr><td class="paramname">data</td><td>Array of type char, which contains the data. </td></tr>
    <tr><td class="paramname">size</td><td>Number of bytes to write. </td></tr>
  </table>
  </dd>
</dl>

<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="class_i_o_unit_aeff3307e483d37a668f06a136fade0b3_icgraph.png" border="0" usemap="#class_i_o_unit_aeff3307e483d37a668f06a136fade0b3_icgraph" alt=""/></div>
<map name="class_i_o_unit_aeff3307e483d37a668f06a136fade0b3_icgraph" id="class_i_o_unit_aeff3307e483d37a668f06a136fade0b3_icgraph">
<area shape="rect" id="node2" href="class_prngd.html#a617fbe2be79677859235262d59b4c0f0" title="Prngd::work" alt="" coords="181,107,272,133"/><area shape="rect" id="node3" href="class_m_q___server.html#a1b5ef576c33539eea304bb7d2ddf15fe" title="MQ_Server::thread_work" alt="" coords="321,5,485,32"/><area shape="rect" id="node4" href="class_prngd___server.html#ad4f2bc38081117e23a1c385ff1dd5e0b" title="Prngd_Server::start" alt="" coords="337,56,470,83"/><area shape="rect" id="node5" href="class_tcp___server.html#a2edda05badb8d3b7838679aaaa70b470" title="Tcp_Server::thread_work" alt="" coords="321,107,485,133"/><area shape="rect" id="node6" href="class_udp___server.html#a1fb86c8c08d020a4e2262cf557e4b78d" title="Udp_Server::thread_work" alt="" coords="320,157,487,184"/><area shape="rect" id="node7" href="class_uds___server.html#a8b68567d116ebb1db824e3039507331d" title="Uds_Server::thread_work" alt="" coords="320,208,487,235"/></map>
</div>
</p>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a class="anchor" id="a09b8a4c138c982c0f069632df4711014"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int IOUnit::bitCount</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Contains the number of read bits, after using readFromFrile(char*, int) </p>

</div>
</div>
<a class="anchor" id="a0ccf4cd0ab6b790dfa6c514ba82287c4"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::vector&lt;short&gt; IOUnit::bitVector</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Contains the binary data from a read file after using <a class="el" href="class_i_o_unit.html#a2f8aaf68900a5afb2536b3cec72ff46f">readFromFile(char*, int)</a> </p>

</div>
</div>
<a class="anchor" id="ad69fd8c50d1d63b31d8d4741cda787c9"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">char IOUnit::nextChar</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Temp var for peeking </p>

</div>
</div>
<a class="anchor" id="a07549e3ee509ef843be69ba714e9726f"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::streambuf* IOUnit::pIbuf</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Streambuffer for input operations </p>

</div>
</div>
<a class="anchor" id="a1bea7057f76b80b660c7a095a4ebb4cb"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::ifstream IOUnit::pIFile</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Input file stream for reading files </p>

</div>
</div>
<a class="anchor" id="a509f96e751b34577c7c90a3db044a277"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::streambuf* IOUnit::pObuf</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Streambuffer for output operations </p>

</div>
</div>
<a class="anchor" id="ad31c0bc90ce593bd14177375c86385ea"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::ofstream IOUnit::pOFile</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Output file stream for writing to files </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>H:/prngd_server/inc/<a class="el" href="_i_o_unit_8h_source.html">IOUnit.h</a></li>
<li>H:/prngd_server/src/IOUnit.cpp</li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="class_i_o_unit.html">IOUnit</a></li>
    <li class="footer">Generated on Fri Aug 29 2014 14:14:52 for prngd by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.8 </li>
  </ul>
</div>
</body>
</html>
=======
<<<<<<< .mine
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.8"/>
<title>prngd: IOUnit Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">prngd
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.8 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('class_i_o_unit.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Variables</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pri-attribs">Private Attributes</a> &#124;
<a href="class_i_o_unit-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">IOUnit Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Class for Input/Output File Operations.  
 <a href="class_i_o_unit.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_i_o_unit_8h_source.html">IOUnit.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a528f72b88cda0f5fe4e66386577c8084"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_i_o_unit.html#a528f72b88cda0f5fe4e66386577c8084">IOUnit</a> ()</td></tr>
<tr class="separator:a528f72b88cda0f5fe4e66386577c8084"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8dd9034a37c91c8bc979245c6d156070"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_i_o_unit.html#a8dd9034a37c91c8bc979245c6d156070">~IOUnit</a> ()</td></tr>
<tr class="separator:a8dd9034a37c91c8bc979245c6d156070"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6449179524033de1ced0c7475f112999"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_i_o_unit.html#a6449179524033de1ced0c7475f112999">checkFile</a> (char *filename)</td></tr>
<tr class="separator:a6449179524033de1ced0c7475f112999"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2f8aaf68900a5afb2536b3cec72ff46f"><td class="memItemLeft" align="right" valign="top">std::vector&lt; short &gt; *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_i_o_unit.html#a2f8aaf68900a5afb2536b3cec72ff46f">readFromFile</a> (char *filename, int offset)</td></tr>
<tr class="separator:a2f8aaf68900a5afb2536b3cec72ff46f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeff3307e483d37a668f06a136fade0b3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_i_o_unit.html#aeff3307e483d37a668f06a136fade0b3">writeToFile</a> (char *filename, char *data, int size)</td></tr>
<tr class="separator:aeff3307e483d37a668f06a136fade0b3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa8a8447579605b12e234fa3f1453cef6"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_i_o_unit.html#aa8a8447579605b12e234fa3f1453cef6">getBitCount</a> ()</td></tr>
<tr class="separator:aa8a8447579605b12e234fa3f1453cef6"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-attribs"></a>
Private Attributes</h2></td></tr>
<tr class="memitem:a1bea7057f76b80b660c7a095a4ebb4cb"><td class="memItemLeft" align="right" valign="top">std::ifstream&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_i_o_unit.html#a1bea7057f76b80b660c7a095a4ebb4cb">pIFile</a></td></tr>
<tr class="separator:a1bea7057f76b80b660c7a095a4ebb4cb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad31c0bc90ce593bd14177375c86385ea"><td class="memItemLeft" align="right" valign="top">std::ofstream&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_i_o_unit.html#ad31c0bc90ce593bd14177375c86385ea">pOFile</a></td></tr>
<tr class="separator:ad31c0bc90ce593bd14177375c86385ea"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a07549e3ee509ef843be69ba714e9726f"><td class="memItemLeft" align="right" valign="top">std::streambuf *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_i_o_unit.html#a07549e3ee509ef843be69ba714e9726f">pIbuf</a></td></tr>
<tr class="separator:a07549e3ee509ef843be69ba714e9726f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a509f96e751b34577c7c90a3db044a277"><td class="memItemLeft" align="right" valign="top">std::streambuf *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_i_o_unit.html#a509f96e751b34577c7c90a3db044a277">pObuf</a></td></tr>
<tr class="separator:a509f96e751b34577c7c90a3db044a277"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0ccf4cd0ab6b790dfa6c514ba82287c4"><td class="memItemLeft" align="right" valign="top">std::vector&lt; short &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_i_o_unit.html#a0ccf4cd0ab6b790dfa6c514ba82287c4">bitVector</a></td></tr>
<tr class="separator:a0ccf4cd0ab6b790dfa6c514ba82287c4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a09b8a4c138c982c0f069632df4711014"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_i_o_unit.html#a09b8a4c138c982c0f069632df4711014">bitCount</a></td></tr>
<tr class="separator:a09b8a4c138c982c0f069632df4711014"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad69fd8c50d1d63b31d8d4741cda787c9"><td class="memItemLeft" align="right" valign="top">char&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_i_o_unit.html#ad69fd8c50d1d63b31d8d4741cda787c9">nextChar</a></td></tr>
<tr class="separator:ad69fd8c50d1d63b31d8d4741cda787c9"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Class for Input/Output File Operations. </p>
<p>A little class for writing and reading from files in binary or ascii mode. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a528f72b88cda0f5fe4e66386577c8084"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">IOUnit::IOUnit </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Constructor </p>

</div>
</div>
<a class="anchor" id="a8dd9034a37c91c8bc979245c6d156070"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">IOUnit::~IOUnit </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Descturctor </p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a6449179524033de1ced0c7475f112999"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool IOUnit::checkFile </td>
          <td>(</td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>filename</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Checks if a file is ready to open. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">filename</td><td>The name of the file which has to opened. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True if the file is ok, flase if not. </dd></dl>

</div>
</div>
<a class="anchor" id="aa8a8447579605b12e234fa3f1453cef6"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int IOUnit::getBitCount </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>After using <a class="el" href="class_i_o_unit.html#a2f8aaf68900a5afb2536b3cec72ff46f">readFromFile(char*, int)</a>, you can use this function to get the number of read bits from the file. </p><dl class="section return"><dt>Returns</dt><dd>Number of bits of the last read file. </dd></dl>

</div>
</div>
<a class="anchor" id="a2f8aaf68900a5afb2536b3cec72ff46f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::vector&lt; short &gt; * IOUnit::readFromFile </td>
          <td>(</td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>filename</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>offset</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Function for reading a file in binary mode (e.g. for generated random bits). </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">filename</td><td>Name of the file. </td></tr>
    <tr><td class="paramname">offset</td><td>Offset for the filepointer (e.g. for skip some bytes of the file) </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A Pointer to an internal result vector, which contains the read bytes. </dd></dl>

</div>
</div>
<a class="anchor" id="aeff3307e483d37a668f06a136fade0b3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void IOUnit::writeToFile </td>
          <td>(</td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>filename</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>size</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Writes data into a file. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">filename</td><td>Name of the file to write to. </td></tr>
    <tr><td class="paramname">data</td><td>Array of type char, which contains the data. </td></tr>
    <tr><td class="paramname">size</td><td>Number of bytes to write. </td></tr>
  </table>
  </dd>
</dl>

<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="class_i_o_unit_aeff3307e483d37a668f06a136fade0b3_icgraph.png" border="0" usemap="#class_i_o_unit_aeff3307e483d37a668f06a136fade0b3_icgraph" alt=""/></div>
<map name="class_i_o_unit_aeff3307e483d37a668f06a136fade0b3_icgraph" id="class_i_o_unit_aeff3307e483d37a668f06a136fade0b3_icgraph">
<area shape="rect" id="node2" href="class_prngd.html#a617fbe2be79677859235262d59b4c0f0" title="Prngd::work" alt="" coords="181,107,272,133"/><area shape="rect" id="node3" href="class_m_q___server.html#a1b5ef576c33539eea304bb7d2ddf15fe" title="MQ_Server::thread_work" alt="" coords="321,5,485,32"/><area shape="rect" id="node4" href="class_prngd___server.html#ad4f2bc38081117e23a1c385ff1dd5e0b" title="Prngd_Server::start" alt="" coords="337,56,470,83"/><area shape="rect" id="node5" href="class_tcp___server.html#a2edda05badb8d3b7838679aaaa70b470" title="Tcp_Server::thread_work" alt="" coords="321,107,485,133"/><area shape="rect" id="node6" href="class_udp___server.html#a1fb86c8c08d020a4e2262cf557e4b78d" title="Udp_Server::thread_work" alt="" coords="320,157,487,184"/><area shape="rect" id="node7" href="class_uds___server.html#a8b68567d116ebb1db824e3039507331d" title="Uds_Server::thread_work" alt="" coords="320,208,487,235"/></map>
</div>
</p>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a class="anchor" id="a09b8a4c138c982c0f069632df4711014"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int IOUnit::bitCount</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Contains the number of read bits, after using readFromFrile(char*, int) </p>

</div>
</div>
<a class="anchor" id="a0ccf4cd0ab6b790dfa6c514ba82287c4"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::vector&lt;short&gt; IOUnit::bitVector</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Contains the binary data from a read file after using <a class="el" href="class_i_o_unit.html#a2f8aaf68900a5afb2536b3cec72ff46f">readFromFile(char*, int)</a> </p>

</div>
</div>
<a class="anchor" id="ad69fd8c50d1d63b31d8d4741cda787c9"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">char IOUnit::nextChar</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Temp var for peeking </p>

</div>
</div>
<a class="anchor" id="a07549e3ee509ef843be69ba714e9726f"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::streambuf* IOUnit::pIbuf</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Streambuffer for input operations </p>

</div>
</div>
<a class="anchor" id="a1bea7057f76b80b660c7a095a4ebb4cb"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::ifstream IOUnit::pIFile</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Input file stream for reading files </p>

</div>
</div>
<a class="anchor" id="a509f96e751b34577c7c90a3db044a277"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::streambuf* IOUnit::pObuf</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Streambuffer for output operations </p>

</div>
</div>
<a class="anchor" id="ad31c0bc90ce593bd14177375c86385ea"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::ofstream IOUnit::pOFile</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Output file stream for writing to files </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>H:/prngd_server/inc/<a class="el" href="_i_o_unit_8h_source.html">IOUnit.h</a></li>
<li>H:/prngd_server/src/IOUnit.cpp</li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="class_i_o_unit.html">IOUnit</a></li>
    <li class="footer">Generated on Fri Aug 29 2014 14:14:52 for prngd by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.8 </li>
  </ul>
</div>
</body>
</html>
=======
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.8"/>
<title>prngd: IOUnit Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">prngd
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.8 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('class_i_o_unit.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Variables</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pri-attribs">Private Attributes</a> &#124;
<a href="class_i_o_unit-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">IOUnit Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Class for Input/Output File Operations.  
 <a href="class_i_o_unit.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_i_o_unit_8h_source.html">IOUnit.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a528f72b88cda0f5fe4e66386577c8084"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_i_o_unit.html#a528f72b88cda0f5fe4e66386577c8084">IOUnit</a> ()</td></tr>
<tr class="separator:a528f72b88cda0f5fe4e66386577c8084"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8dd9034a37c91c8bc979245c6d156070"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_i_o_unit.html#a8dd9034a37c91c8bc979245c6d156070">~IOUnit</a> ()</td></tr>
<tr class="separator:a8dd9034a37c91c8bc979245c6d156070"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6449179524033de1ced0c7475f112999"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_i_o_unit.html#a6449179524033de1ced0c7475f112999">checkFile</a> (char *filename)</td></tr>
<tr class="separator:a6449179524033de1ced0c7475f112999"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2f8aaf68900a5afb2536b3cec72ff46f"><td class="memItemLeft" align="right" valign="top">std::vector&lt; short &gt; *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_i_o_unit.html#a2f8aaf68900a5afb2536b3cec72ff46f">readFromFile</a> (char *filename, int offset)</td></tr>
<tr class="separator:a2f8aaf68900a5afb2536b3cec72ff46f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeff3307e483d37a668f06a136fade0b3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_i_o_unit.html#aeff3307e483d37a668f06a136fade0b3">writeToFile</a> (char *filename, char *data, int size)</td></tr>
<tr class="separator:aeff3307e483d37a668f06a136fade0b3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa8a8447579605b12e234fa3f1453cef6"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_i_o_unit.html#aa8a8447579605b12e234fa3f1453cef6">getBitCount</a> ()</td></tr>
<tr class="separator:aa8a8447579605b12e234fa3f1453cef6"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-attribs"></a>
Private Attributes</h2></td></tr>
<tr class="memitem:a1bea7057f76b80b660c7a095a4ebb4cb"><td class="memItemLeft" align="right" valign="top">std::ifstream&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_i_o_unit.html#a1bea7057f76b80b660c7a095a4ebb4cb">pIFile</a></td></tr>
<tr class="separator:a1bea7057f76b80b660c7a095a4ebb4cb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad31c0bc90ce593bd14177375c86385ea"><td class="memItemLeft" align="right" valign="top">std::ofstream&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_i_o_unit.html#ad31c0bc90ce593bd14177375c86385ea">pOFile</a></td></tr>
<tr class="separator:ad31c0bc90ce593bd14177375c86385ea"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a07549e3ee509ef843be69ba714e9726f"><td class="memItemLeft" align="right" valign="top">std::streambuf *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_i_o_unit.html#a07549e3ee509ef843be69ba714e9726f">pIbuf</a></td></tr>
<tr class="separator:a07549e3ee509ef843be69ba714e9726f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a509f96e751b34577c7c90a3db044a277"><td class="memItemLeft" align="right" valign="top">std::streambuf *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_i_o_unit.html#a509f96e751b34577c7c90a3db044a277">pObuf</a></td></tr>
<tr class="separator:a509f96e751b34577c7c90a3db044a277"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0ccf4cd0ab6b790dfa6c514ba82287c4"><td class="memItemLeft" align="right" valign="top">std::vector&lt; short &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_i_o_unit.html#a0ccf4cd0ab6b790dfa6c514ba82287c4">bitVector</a></td></tr>
<tr class="separator:a0ccf4cd0ab6b790dfa6c514ba82287c4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a09b8a4c138c982c0f069632df4711014"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_i_o_unit.html#a09b8a4c138c982c0f069632df4711014">bitCount</a></td></tr>
<tr class="separator:a09b8a4c138c982c0f069632df4711014"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad69fd8c50d1d63b31d8d4741cda787c9"><td class="memItemLeft" align="right" valign="top">char&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_i_o_unit.html#ad69fd8c50d1d63b31d8d4741cda787c9">nextChar</a></td></tr>
<tr class="separator:ad69fd8c50d1d63b31d8d4741cda787c9"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Class for Input/Output File Operations. </p>
<p>A little class for writing and reading from files in binary or ascii mode. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a528f72b88cda0f5fe4e66386577c8084"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">IOUnit::IOUnit </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Constructor </p>

</div>
</div>
<a class="anchor" id="a8dd9034a37c91c8bc979245c6d156070"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">IOUnit::~IOUnit </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Descturctor </p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a6449179524033de1ced0c7475f112999"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool IOUnit::checkFile </td>
          <td>(</td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>filename</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Checks if a file is ready to open. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">filename</td><td>The name of the file which has to opened. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True if the file is ok, flase if not. </dd></dl>

</div>
</div>
<a class="anchor" id="aa8a8447579605b12e234fa3f1453cef6"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int IOUnit::getBitCount </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>After using <a class="el" href="class_i_o_unit.html#a2f8aaf68900a5afb2536b3cec72ff46f">readFromFile(char*, int)</a>, you can use this function to get the number of read bits from the file. </p><dl class="section return"><dt>Returns</dt><dd>Number of bits of the last read file. </dd></dl>

</div>
</div>
<a class="anchor" id="a2f8aaf68900a5afb2536b3cec72ff46f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::vector&lt; short &gt; * IOUnit::readFromFile </td>
          <td>(</td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>filename</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>offset</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Function for reading a file in binary mode (e.g. for generated random bits). </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">filename</td><td>Name of the file. </td></tr>
    <tr><td class="paramname">offset</td><td>Offset for the filepointer (e.g. for skip some bytes of the file) </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A Pointer to an internal result vector, which contains the read bytes. </dd></dl>

</div>
</div>
<a class="anchor" id="aeff3307e483d37a668f06a136fade0b3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void IOUnit::writeToFile </td>
          <td>(</td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>filename</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>size</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Writes data into a file. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">filename</td><td>Name of the file to write to. </td></tr>
    <tr><td class="paramname">data</td><td>Array of type char, which contains the data. </td></tr>
    <tr><td class="paramname">size</td><td>Number of bytes to write. </td></tr>
  </table>
  </dd>
</dl>

<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="class_i_o_unit_aeff3307e483d37a668f06a136fade0b3_icgraph.png" border="0" usemap="#class_i_o_unit_aeff3307e483d37a668f06a136fade0b3_icgraph" alt=""/></div>
<map name="class_i_o_unit_aeff3307e483d37a668f06a136fade0b3_icgraph" id="class_i_o_unit_aeff3307e483d37a668f06a136fade0b3_icgraph">
<area shape="rect" id="node2" href="class_prngd.html#a617fbe2be79677859235262d59b4c0f0" title="Prngd::work" alt="" coords="181,107,272,133"/><area shape="rect" id="node3" href="class_m_q___server.html#a1b5ef576c33539eea304bb7d2ddf15fe" title="MQ_Server::thread_work" alt="" coords="321,5,485,32"/><area shape="rect" id="node4" href="class_prngd___server.html#ad4f2bc38081117e23a1c385ff1dd5e0b" title="Prngd_Server::start" alt="" coords="337,56,470,83"/><area shape="rect" id="node5" href="class_tcp___server.html#a2edda05badb8d3b7838679aaaa70b470" title="Tcp_Server::thread_work" alt="" coords="321,107,485,133"/><area shape="rect" id="node6" href="class_udp___server.html#a1fb86c8c08d020a4e2262cf557e4b78d" title="Udp_Server::thread_work" alt="" coords="320,157,487,184"/><area shape="rect" id="node7" href="class_uds___server.html#a8b68567d116ebb1db824e3039507331d" title="Uds_Server::thread_work" alt="" coords="320,208,487,235"/></map>
</div>
</p>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a class="anchor" id="a09b8a4c138c982c0f069632df4711014"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int IOUnit::bitCount</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Contains the number of read bits, after using readFromFrile(char*, int) </p>

</div>
</div>
<a class="anchor" id="a0ccf4cd0ab6b790dfa6c514ba82287c4"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::vector&lt;short&gt; IOUnit::bitVector</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Contains the binary data from a read file after using <a class="el" href="class_i_o_unit.html#a2f8aaf68900a5afb2536b3cec72ff46f">readFromFile(char*, int)</a> </p>

</div>
</div>
<a class="anchor" id="ad69fd8c50d1d63b31d8d4741cda787c9"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">char IOUnit::nextChar</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Temp var for peeking </p>

</div>
</div>
<a class="anchor" id="a07549e3ee509ef843be69ba714e9726f"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::streambuf* IOUnit::pIbuf</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Streambuffer for input operations </p>

</div>
</div>
<a class="anchor" id="a1bea7057f76b80b660c7a095a4ebb4cb"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::ifstream IOUnit::pIFile</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Input file stream for reading files </p>

</div>
</div>
<a class="anchor" id="a509f96e751b34577c7c90a3db044a277"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::streambuf* IOUnit::pObuf</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Streambuffer for output operations </p>

</div>
</div>
<a class="anchor" id="ad31c0bc90ce593bd14177375c86385ea"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::ofstream IOUnit::pOFile</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Output file stream for writing to files </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>H:/prngd_server/inc/<a class="el" href="_i_o_unit_8h_source.html">IOUnit.h</a></li>
<li>H:/prngd_server/src/IOUnit.cpp</li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="class_i_o_unit.html">IOUnit</a></li>
    <li class="footer">Generated on Sun Aug 31 2014 18:01:31 for prngd by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.8 </li>
  </ul>
</div>
</body>
</html>
>>>>>>> .r39
>>>>>>> .r46
